﻿@{
    Layout = null;
}
@using MvcMall.AdminPortal.Controllers.SysSettings.ViewModels;
@model SysSettingModel
<!DOCTYPE html>
<html>
<head>
    <title>网站基础设置</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs({
                ajaxOptions: {
                    error: function (xhr, status, index, anchor) {
                        $(anchor.hash).html("系统繁忙,请稍候再试");
                    }
                }
            });

            $("#sysSettingForm").submit(function () {

                return confirm('确定保存?');
            });
        });  
    </script>
</head>
<body>
    <div id="tabs">
        <ul>
            <li><a href="#saveMenu">网站基础设置</a> </li>
        </ul>
        <div id="saveMenu">
            @using (Html.BeginForm("Index", "SysSettings", FormMethod.Post, new { Id = "sysSettingForm", enctype = "multipart/form-data" }))
            {
                
                <div class="editor-label">
                    @Html.HiddenFor(m => m.SysSettingId)
                    @Html.HiddenFor(m => m.DefGoodsImg)
                    @Html.HiddenFor(m => m.DefShopImg)
                    @Html.HiddenFor(m => m.DefUserImg)
                    @Html.LabelFor(m => m.Keywords)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(x => x.Keywords, new { @maxlength = "255", @style = "width:400px;" })
                </div>
                
                <div class="editor-label">
                    @Html.LabelFor(m => m.SearchWords)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(x => x.SearchWords, new { @maxlength = "255", @style = "width:400px;" })
                </div>
                <div class="editor-label">
                    @Html.LabelFor(m => m.IsOpen)
                </div>
                <div class="editor-field">
                    @Html.CheckBoxFor(x => x.IsOpen)
                </div>
                  
                
                <div class="editor-label">
                    @Html.LabelFor(m => m.ClosedReason)
                </div>
                <div class="editor-field">
                    @Html.TextAreaFor(x => x.ClosedReason, new { @maxlength = "255", @style = "width:400px;height:80px" })
                </div> 
                 
                <div>
                    @if (Model != null && !string.IsNullOrEmpty(Model.DefGoodsImg) && File.Exists(MvcMall.Framework.Utility.Utils.GetWebSiteBasePath() + Model.DefGoodsImg))
                    { 
                        <img src="@Model.DefGoodsImg" style=" width:150px; height:150px;" />
                    }
                    else
                    {
                        @:《暂无图片》
                                                                                                                    }
                </div>
                <div class="editor-label">
                    商品默认图片
                </div>
                <div class="editor-field">
                    <input name="defaultShopImg" id="defaultShopImg" type="file" />
                </div>
                <div>
                    @if (Model != null && !string.IsNullOrEmpty(Model.DefShopImg) && File.Exists(MvcMall.Framework.Utility.Utils.GetWebSiteBasePath() + Model.DefShopImg))
                    { 
                        <img src="@Model.DefShopImg" style=" width:150px; height:150px;" />
                    }
                    else
                    { 
                        @:《暂无图片》
                                                                                                                    }
                </div>
                <div class="editor-label">
                    店铺默认标志
                </div>
                <div class="editor-field">
                    <input name="defaultLogo" id="defaultLogo" type="file" />
                </div>
                <div>
                    @if (Model != null && !string.IsNullOrEmpty(Model.DefUserImg) && File.Exists(MvcMall.Framework.Utility.Utils.GetWebSiteBasePath() + Model.DefUserImg))
                    { 
                        <img src="@Model.DefUserImg" style=" width:150px; height:150px;" />
                    }
                    else
                    { 
                        @:《暂无图片》
                                                                                                                    }
                </div>
                <div class="editor-label">
                    会员默认头像
                </div>
                <div class="editor-field">
                    <input name="defaultUserHead" id="defaultUserHead" type="file" />
                </div> 
                <p>
                    <input type="submit" value="保存" /></p> 
            }
        </div>
    </div>
</body>
</html>
